package main

import "fmt"

func main() {
	var demochan = make(chan int, 3)
	//生产者
	demochan <- 1
	demochan <- 2
	demochan <- 3
	close(demochan)

	for i := 0; i < 4; i++ {
		data, ok := <-demochan
		fmt.Println(data, ok)
	}

}
